package com.showtao.front.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.showtao.front.domain.Tag;

public interface TagRepository extends JpaRepository<Tag, Long> {

    @Query("select t from Tag t " +
    		" left join t.articles" +
    		" where t.alias = :alias")
    Tag getByAlias(@Param("alias")String alias);
    
}
